﻿<%@ Page Language="C#" MasterPageFile="~/Member/UserManage.master" AutoEventWireup="true"
    CodeFile="NewsList.aspx.cs" Inherits="Member_News_NewsList" Title="公司动态管理" %>

<%@ Register Src="../../Control/PageNo.ascx" TagName="PageNo" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContInfo" runat="Server">
        <script type="text/javascript">
        function SelectAll()
        {
            // 找到所有的 input 元素
            var ctllist = document.getElementsByTagName("input");
            var objcheckbox= document.getElementById("CheckBox2");     
            for( var i = 0; i< ctllist.length; i++)
            {
                if(ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0 )
                {   
                    if(objcheckbox.checked==true)     
                         ctllist[i].checked = true;
                    else
                         ctllist[i].checked = false;
                }
          
             }
         }
     </script>
    <div class="inkg mar_top">
    <strong class="inkgt">
        公司动态管理</strong>
	<div class="intip mar_top">
            <strong class="intipt">提&nbsp;示：</strong><p>·您在管理公司动态的时候请慎重选择是否删除！</p>
			</div>
			<div class="inso mar_top">
			  <table width="540" cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td>
                标题名称：<asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>&nbsp;公司名称：
                <asp:TextBox ID="txtCompany" runat="server"></asp:TextBox>
                <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="立即查询" CssClass="del" /></td>
        </tr>
    </table>
			</div>
    <div class="intab mar_top" id="intab">
        <ul class="intabt">
            <li class="intabt2">全部信息</li>
        </ul>
        <div class="intabc" id="intabc">
            <div class="con" style="display: block">
            <table cellpadding="0" cellspacing="0" border="0" class="edtb">
                            <thead>
                                <tr>
                                    <td id="xh" align="center" width="40">
                                        <strong>选项</strong>
                                    </td>
                                    <td align="center" width="80">
                                        <strong>标题</strong>
                                    </td>
                                    <td align="center">
                                        <strong>详细信息</strong>
                                    </td>
                                    <td align="center" width="80">
                                        <strong>公司名称</strong>
                                    </td>
                                    <td align="center" width="80">
                                        <strong>添加日期</strong>
                                    </td>
                                    <td align="center" width="50">
                                        <strong>审核</strong>
                                    </td>
                                    <td align="center" width="50">
                                        <strong>操作</strong>
                                    </td>
                                </tr>
                            </thead>
                            <tbody>
                 <asp:Repeater  ID="grdCorpNews" runat="server"  > 
                    <ItemTemplate>
                        <tr>
                            <td width="40" align="center">
                                <input runat="server" value='<%# DataBinder.Eval(Container.DataItem,"ID")%>' id="chk" name="chk"
                                    type="checkbox" onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" />
                            </td>
                            <td width="80" align="center">
                               <%# Eval("Title").ToString().Length <= 15 ? Eval("Title").ToString() : Eval("Title").ToString().Substring(0,15)+"..." %>
                            </td>
                            <td  align="center">
                               <%# Eval("Info").ToString().Length <= 15 ? Eval("Info").ToString() : Eval("Info").ToString().Substring(0,15)+"..." %>
                            </td>
                            <td align="center" width="80">
                               <%# Eval("CompanyName").ToString().Length <= 15 ? Eval("CompanyName").ToString() : Eval("CompanyName").ToString().Substring(0, 15) + "..."%>
                            </td>
                            <td align="center" width="80">
                                <%# GetShortDate(Eval("AddDate").ToString())%>
                            </td>
                            <td align="center" width="50">
                              <%# Eval("Verify").ToString()=="True"?"已审":"未审" %>
                            </td>
                            <td align="center" width="50">
                             <a href='NewsEdit.aspx?ID=<%# Eval("ID")%>'>编辑</a>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater >
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="7">
                                    <p class="zi1">
                                                     <input runat="server" class="checkbox" type="checkbox" id="chkall" name="chkall" onclick="CheckMinoAll();" />
                                        全选
                                        <asp:Button ID="btnDelete" runat="server" Font-Size="9pt" OnClick="btnDelete_Click"
                                            OnClientClick="return CheckSelect();return confirm('你确认要删除吗?');" Text="批量删除" CssClass="del"  />
                                    </p>
                                    <p class="zi2">
                                        <uc1:PageNo ID="PageNo1" runat="server" />
                                    </p>
                                </td>
                            </tr>
                        </tfoot>
                        </table>
                         <input type="hidden" id="CheckedIDS" name="CheckedIDS" value="0" runat="server" />
                </div>
                <asp:Label ID="lblMessage" runat="server" Text="Label" Visible="False"></asp:Label>
    </div>
				</div>
</div>
</asp:Content>
